package com.tfjybj.itoo.exam.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Set;

/**
 * TemporaryClassStudentModel
 * 临时上课班小组学生
 *
 * @author 郭满亮
 * @version 2.0.0
 * @since 2.0.0 2019-02-01 19:19:48
 */
@ApiModel(value = "TemporaryClassStudentModel:临时上课班小组学生")
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
public class TemporaryClassStudentModel implements Serializable{
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id",required = true)
    private String id;
    /**
     * 上课班id
     */
    @ApiModelProperty(value = "上课班id")
    private String teachClassId;
    /**
     * 上课班名称
     */
    @ApiModelProperty(value = "上课班名称")
    private String teachClassName;
    /**
     * 课程id
     */
    @ApiModelProperty(value = "课程id")
    private String courseId;
    /**
     * 课程名称
     */
    @ApiModelProperty(value = "课程名称")
    private String courseName;
    /**
     * 学生_id
     */
    @ApiModelProperty(value = "用户姓名",required = true)
    private String name;

    /**
     * key文本
     */
    @ApiModelProperty(value = "key文本",required = true)
    private String keyText;

    /**
     * 所有人的信息
     */
    @ApiModelProperty(value = "所有人的信息")
    private Set<TemporaryClassStudentModel> userSet;
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TemporaryClassStudentModel faceModel = (TemporaryClassStudentModel) o;

        if (keyText != null ? !keyText.equals(faceModel.keyText) : faceModel.keyText != null) return false;
        if (id != null ? !id.equals(faceModel.id) : faceModel.id != null) return false;
        return name != null ? name.equals(faceModel.name) : faceModel.name == null;
    }

    @Override
    public int hashCode() {
        int result = keyText != null ? keyText.hashCode() : 0;
        result = 31 * result + (id != null ? id.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        return result;
    }
}

